Repository navigation
Port: play the cursor sound when the mouse moves a menu cursor - #107
Closed
carrdylan52 wants to merge 6 commits into
Closed
carrdylan52 wants to merge 6 commits into
carrdylan52 wants to merge 6 commits into
Conversation
Hover selects cards, items, badges and class rows; a click confirms and a right click backs out; the wheel scrolls lists and eases the item grid like the D-pad scroll. Pages without targets ignore stray left clicks, and a click wins over a wheel notch in the same frame.
Character page portraits take hover and click; only a portrait click confirms, and left clicks do nothing while a character change loads. Cedric's repair board takes hover, wheel and item clicks, and its input no longer reaches his command list after it closes. The menu pointer keeps one facing: retail mirrors the hand at Max, which made the pointer's body jump across its hotspot. Retail Options rows and buttons follow hover and the wheel scrolls the list; Help entries follow hover and scroll, and the wheel turns its picture pages. Rows are hit where they are drawn and only inside the list's clip, so a row sliding under the footer cannot be clicked.
The FPS capture and presentation now record the FPS counter and menu pointer through one helper, so a capture shows the pointer where a presented frame does. The usage text and PC.md say so.
A notch over the bag moved the cursor a row while the board stayed put, so with the pointer on the top row the selection and its Sell price popup walked away from it. A goods list or bag longer than its window now scrolls one row per notch through the retail eased scroll (MenuMouseScroll for the list, the ITEM page's ScrollTop and WheelTarget for the bag), and the cursor takes the entry that settles under the pointer. Rows sliding out of the window can no longer be hovered, so a hover cannot scroll the pane back. A list that fits still moves its cursor through the retail keys. The wheel never enters an empty goods list, as retail keeps the bag in front when stock runs out.
Hover and the wheel moved several menu cursors silently: shop goods, bag and quantity board, the ITEM page's build-up list and the same index on another ITEM panel. MenuMouseCursorSound plays SYSTEM_SE_CURSOR at most once a tick from the adapters that set a cursor themselves; paths where retail already sounds the move (synthesized directions, MenuMouseMove, the post-hook cursor check) are left to retail. In the shop, the adapter sounds its own pane or quantity change only when the retail press it sends will not move, so each real change sounds once, at limits too. The fishing-rod stats no longer sound twice. PC SETTINGS rows stay silent, as with the keyboard.
Contributor
Author
|
Opened from a stale pre-merge branch by mistake; replaced by #109. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #106 (stacked on it; the diff shows its commit until it merges). The change here is the last commit.
Before: hover and the wheel moved several menu cursors silently (shop goods, bag and quantity board, the ITEM page's build-up list, the same index on another ITEM panel), and the fishing-rod stats sounded twice.
After: each real mouse cursor change plays the retail cursor sound exactly once, including at list ends and quantity limits.
How:
MenuMouseCursorSoundplays SYSTEM_SE_CURSOR at most once a tick for cursors the adapters set themselves; moves the retail step already sounds (synthesized directions,MenuMouseMove, the post-hook cursor check) stay retail's. The shop predicts whether the retail press it sends will move (RetailMoves) and sounds its own change only when it won't. APORT_OVERRIDE MenuSePlay(int)keeps the retail body and counts sounds for tests. PC SETTINGS rows stay silent, as with the keyboard.Tests: sound-count cases in the shop, item, world map and menu tests, including limits and pane switches.